﻿using System.Configuration;

namespace Tilver.Configuration.Data
{
    public class DataConfigElement : ConfigurationElement
    {
        /// <summary>
        /// 默认数据库
        /// </summary>
        [ConfigurationProperty("defaultDataBase", IsRequired = true)]
        public string DefaultDataBase
        {
            get { return (string)this["defaultDataBase"]; }
            set { this["defaultDataBase"] = value; }
        }
        /// <summary>
        /// 数据库连接串
        /// </summary>
        [ConfigurationProperty("connectionStrings")]
        public ConnectionStringsCollection ConnectionStrings
        {
            get { return this["connectionStrings"] as ConnectionStringsCollection; }
            set { this["connectionStrings"] = value; }
        }
        /// <summary>
        /// 数据库访问路由
        /// </summary>
        [ConfigurationProperty("dataRouterProvider")]
        public string DataRouterProvider
        {
            get { return (string)this["dataRouterProvider"]; }
            set { this["dataRouterProvider"] = value; }
        }
    }
}
